<?php

/**
 * Created by PhpStorm.
 * Author: ls
 * Time: 2023/9/18 9:30
 * Desc: 会员消息
 */
class Request_Api_V2_Member_Message extends Request_Api_V2_Base
{
    public function __construct($request_param)
    {
        parent::__construct($request_param);

        //自定义规则
        $this->validation->rule('mid', array('Rule_Member', 'need_member'));
    }

    public function list()
    {
        $this->rules = [
            ['pagesize', ['digit', $this->rule_min(1)]],
            ['page', ['digit', $this->rule_min(1)]],
            ['status', ['digit', $this->rule_in_array([0, 1])]],
        ];

        return $this;
    }

    public function viewed()
    {
        $this->rules = [
            ['id', ['not_empty', 'digit', $this->rule_min(1)]],
        ];

        return $this;
    }
}